using System;
using System.Collections.Generic;
using System.Text;

namespace GeneticAlgorithm.CP1
{
    /// <summary>
    /// f(x, y) = x^2 + y^2, find (x, y) in range of [-5, 5] that maximize
    /// the function.
    /// </summary>
    public class Problem : Problem<float[], float>
    {
        /// <summary>
        /// </summary>
        /// <param name="solution">(x, y)</param>
        /// <returns>f(x, y)</returns>
        public override float Evaluate(float[] solution)
        {
            return solution[0] * solution[0] + solution[1] * solution[1];
        }
      
    }
}
